package com.woniuxy.qimengparent.controller;

import com.woniuxy.qimengparent.bean.ParentBean;
import com.woniuxy.qimengparent.service.ParentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (ParentBean)表控制层
 *
 * @author makejava
 * @since 2020-08-25 19:35:42
 */
@RestController
@RequestMapping("/parent")
public class ParentController {
    /**
     * 服务对象
     */
    @Resource
    private ParentService parentService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/selectOne")
    public ParentBean selectOne(Integer id) {
        return this.parentService.queryById(id);
    }

}